﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WeManageForm
{
    public partial class HomePlanForm : Form
    {
        int ListShift = 0;//一个变量控制用于切换周历0和列表1
        public HomePlanForm()
        {
            InitializeComponent();
            ListFrom listFrom = new ListFrom { TopLevel = false, FormBorderStyle = FormBorderStyle.None };//要添加的Form不显示窗体头和边框
            FLPPlanList.Controls.Add(listFrom);//把form里的内容添到panel中
            listFrom.Show();//显示内容 
        }

        private void BtnListShift_Click(object sender, EventArgs e)
        {
            FLPPlanList.Controls.Clear();//点击按钮，先清空panel里的内容
            if (ListShift == 0)
            {
                ListShift = 1;
                WeekForm weekForm = new WeekForm { TopLevel = false, FormBorderStyle = FormBorderStyle.None };//要添加的Form不显示窗体头和边框
                FLPPlanList.Controls.Add(weekForm);//把form里的内容添到panel中
                weekForm.Show();//显示内容 
            }
            else
            {
                ListShift = 0;
                ListFrom listFrom = new ListFrom { TopLevel = false, FormBorderStyle = FormBorderStyle.None };//要添加的Form不显示窗体头和边框
                FLPPlanList.Controls.Add(listFrom);//把form里的内容添到panel中
                listFrom.Show();//显示内容 
            }
        }
    }
}
